pub fn odd_fibnacci_sum(threshold: u32) -> u32 {
    if threshold == 0 { 
        return 0;
    } else if threshold == 1 { 
        return 1;
    }
    let mut  res = 1;
    let mut fib_table = (0, 1);
    let mut fib = 0;
    while threshold > fib {
        if fib % 2 != 0 {
            res += fib;
        }
        fib = fib_table.0 + fib_table.1;
        fib_table = (fib_table.1, fib);
    }
    res
}
